#include<cstdio>
using namespace std;
int main()
{
	int a;
	scanf("%d", &a);
	int bai = a / 100;
	int shi = a %100 / 10;
	int ge = a % 100 % 10;
	printf("%d", ge * 100 + shi * 10 + bai);
	return 0;
}
